import {customeStruct} from '../utils';
const itf = customeStruct.interface;

export const List = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            rowVersion: 'string',
            options: ['string']
        })],
        totalElements: 'number'
    })
});

export const Detail = itf({
    payload: itf(
        {
            id: 'string',
            subDealerId: 'string',
            rowVersion: 'string',
            options: ['string'],
            accessoryDetails: [itf({
                usedPartId: 'string? | null',
                quantity: 'number? | null'
            })],
            details: [
                itf({
                    usedPartId: 'string? | null',
                    quantity: 'number? | null'
                })
            ],
        },
        
    )
});

export const Part = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                name: 'string',
            })
        ],
        totalElements: 'number'
    })
});

export const Brand = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                name: 'string',
            })
        ],
    })
});
